#pragma once

#include "Platform.h"
#include "Player.h"
#include "Effect.h"
#include "HealthPack.h"

class PlayState : public Zeni::Gamestate_Base
{
	public:
		PlayState(int levelNum_ = 1, int points_ = 0);
		~PlayState();

	private:
		int levelNum;
		float playTime;
		int points;

		std::string levelName;
		float backgroundHeight, levelLength;
		std::vector<Platform*> platforms;
		std::vector<Player*> npcs;
		std::vector<Projectile*> projectiles;
		std::vector<Effect*> effects;
		std::vector<HealthPack*> healthPacks;
		std::vector<Zeni::Sound_Source*> soundsPlaying;
		std::vector<Zeni::Sound_Source*> soundsStopped;
		void playSound(string soundname);
		Player* player;
		void on_key(const SDL_KeyboardEvent &event);
		void perform_logic();
		Zeni::Vertex_Buffer* background;
		float screenTop, baseScreenTop;

		void weaponFire(Player* p);
		void brainSlugJump(Player* p);
		std::pair<Zeni::Point2f, Zeni::Point2f> viewArea;
		void render();
		bool m_paused;
};
